﻿//关闭页面
function FORM_CLOSE() {
    var index = top.layer.getFrameIndex(window.name); //获取窗口索引
    try {
        top.$("#layui-layer" + index + " .layui-layer-close").click();
    } catch (e) {
        //强制关闭页面
        try {
            top.layer.close(index);
        } catch (e) {
        }
    }
}
//更新模态标题
function FORM_UPDATE_TITLE(title) {
    var index = top.layer.getFrameIndex(window.name); //获取窗口索引
    top.$("#layui-layer" + index + " .layui-layer-title").text(title);
}
//更新窗体大小
function FORM_SIZE(width, height) {
    console.log("获取到参数：" + width + "x-" + height);
    var index = top.layer.getFrameIndex(window.name); //获取窗口索引
    top.$("#layui-layer-iframe" + index).height(height - 42);
    top.$("#layui-layer" + index).width(width);
    top.$("#layui-layer" + index).height(height);
}
//兼容性处理
if (typeof console == 'undefined') {
    console = {
        log: function () {
        }
    }
}